package com.bruce.starts.demo.designpattern.composite;

public class CompositePatternDemo {
    public static void main(String[] args) {
        Directory directory = new Directory("F:\\practice");
        File file1 = new File("F:\\practice\\装饰器模式.md");
        File file2 = new File("F:\\practice\\状态模式.md");
        File file3 = new File("F:\\practice\\组合模式.md");
        directory.add(file1);
        directory.add(file2);
        directory.add(file3);
        System.out.println(directory.countNumOfFiles());
        System.out.println(directory.countSizeOfFiles());
    }
}
